package com.swm.phonemesutils;

public class PhoneMessage {

    // 用户名
    private static String Uid = "iyunlink";

    // 接口安全秘钥
    private static String Key = "1C5CE723D7A1C694A4D2532A97DCF0CF";

    /*
     * // 手机号码，多个号码如13800000000,13800000001,13800000002 private static String
     * smsMob = "15639704237";
     *
     * // 短信内容 private static String smsText = "验证码：8888";
     *
     * public static void main(String[] args) {
     *
     * HttpClientUtil client = HttpClientUtil.getInstance();
     *
     * // UTF发送 int result = client.sendMsgUtf8(Uid, Key, smsText, smsMob); if
     * (result > 0) { System.out.println("UTF8成功发送条数==" + result); } else {
     * System.out.println(client.getErrorMsg(result)); } }
     */
    public static int sendmessage(String smsmob, String smstex) {
        HttpClientUtil client = HttpClientUtil.getInstance();
        System.out.println(smsmob);
        System.out.println(smstex);
        // UTF发送

        int result = client.sendMsgUtf8(Uid, Key, smstex, smsmob);
        if (result > 0) {
            System.out.println("成功发送条数==" + result);
        } else {
            System.out.println(client.getErrorMsg(result));
        }
        return result;
    }

}